\documentclass[10pt]{article}
\usepackage[top=2cm,bottom=2cm,left=2cm,right=2cm,a4paper]{geometry}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{amssymb,amsmath}
\usepackage{eurosym}
\usepackage{fourier}
\usepackage{enumerate}
\usepackage{ctable}
\usepackage{float,lscape} % provides the H option for float placement

\usepackage{graphicx}
% We will generate all images so they have a width \maxwidth. This means
% that they will get their normal width if they fit onto the page, but
% are scaled down if they would overflow the margins.
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth0.7\linewidth
\else\Gin@nat@width\fi}
\makeatother
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\fbox{\Oldincludegraphics[width=\maxwidth]{#1}}}
\usepackage[unicode=true,
            colorlinks=true,
            linkcolor=blue]{hyperref}
\setlength{\headheight}{15pt}
\usepackage{xcolor,fancybox,fancyhdr}

\definecolor{bleufonce}{rgb}{0,0.4823529,0.549019}
\pagestyle{fancy}
\renewcommand\headrule{\color{bleufonce}\hrule height 2pt width\headwidth}
\pagenumbering{arabic}
\lhead{\colorbox{bleufonce}{\color{white}\textbf{$title$}}}
\chead{}
\rhead{\itshape{\nouppercase{\leftmark}}}
\lfoot{$version$}
\rfoot{}
\cfoot{\thepage}




% redefinir la taillle de l'environnement verbatim
\makeatletter
\def\verbatim{\footnotesize\@verbatim \frenchspacing\@vobeyspaces \@xverbatim}
\makeatother

\usepackage{fancyvrb}
\DefineShortVerb[commandchars=\\\{\}]{\|}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{fontsize=\footnotesize,commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\newenvironment{Shaded}{}{}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}}
\newcommand{\RegionMarkerTok}[1]{{#1}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
\newcommand{\NormalTok}[1]{{#1}}
% Redefine labelwidth for lists; otherwise, the enumerate package will cause
% markers to extend beyond the left margin.
\makeatletter\AtBeginDocument{%
  \renewcommand{\@listi}
    {\setlength{\labelwidth}{4em}}
}\makeatother

\hypersetup{breaklinks=true, pdfborder={0 0 0}}
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\widowpenalty=10000
\clubpenalty=10000

\usepackage[frenchb]{babel}

$if(numbersections)$
$else$
\setcounter{secnumdepth}{0}
$endif$
\VerbatimFootnotes % allows verbatim text in footnotes
$for(header-includes)$
$header-includes$
$endfor$

$if(title)$
\title{$title$}
$endif$
\author{$for(author)$$author$$sep$\\$endfor$}
$if(date)$
\date{$date$}
$endif$

\begin{document}
$if(title)$
\maketitle
$endif$

$if(toc)$
\tableofcontents
\newpage

$endif$

$body$

\end{document}
